package comm.event;

import org.springframework.context.ApplicationEvent;

/**
 * @Description: TODO
 * @Author: chris_cai@enable-ets.com
 * @Since: 2018年09月27日
 */
public class DemoEvent extends ApplicationEvent {

    /**
     * 自定义事件,需要集成 ApplicationEvent 类
     * 需要有序列化标识
     * 构造方法需要 Object source 即 发布者publisher
     */

    private static final long serialVersionUID = 7845865357244616418L;

    private String message;

    public DemoEvent(Object source) {
        super(source);
    }

    public DemoEvent(Object source, String message) {
        super(source);
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
